#include <iostream>

#include "cash.h"

using namespace std;

int main()
{
    cout << "Please input the charge:\n> ";
    double charge = 0;
    cin >> charge;
    cout << "Please choose a preferential policy:\n"
         << "1. 正常收费\n"
         << "2. 满300减100\n"
         << "3. 打八折\n> ";
    int strategy = 0;
    cin >> strategy;
    CashContext *context = new CashContext(strategy);
    double total = context->GetResult(charge);
    cout << "Total: " << total << endl;
    return 0;
}